package com.zrrd.CEI.$01;

public class Number implements Runnable {

    @Override
    public void run() {
        for (int i = 1; i <= 1100; i++) {
            System.out.println(i);
            try {
                Thread.sleep(300); // 休眠300毫秒
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
class test{
    public static void main(String[] args) {
        Number n = new Number();

        Thread t1 = new Thread(n);
        t1.setPriority(Thread.MIN_PRIORITY);
        t1.start();

        Thread t2 = new Thread(n);
        t2.setPriority(Thread.MAX_PRIORITY);
        t2.start();

        Thread t3 = new Thread(n);
        t3.setPriority(Thread.NORM_PRIORITY);
        t3.start();
    }
}
